package com.longrise.android.byjk.plugins.dealsituation.cachecourse.downloadeddetail;

import com.longrise.common.base.BasePresenter;
import com.longrise.common.base.BaseView;
import com.longrise.android.byjk.model.DownloadedDetailBean;
import com.longrise.filedownloader.DownloadManager;

import java.util.List;

/**
 * Created by callxkj on 2017/4/6.
 * 下载详情
 */

public interface DownloadedDetailContract {

    interface View extends BaseView {
        void showLoading();

        void dismissLoading();

        void toast(String msg);

        void updateData(DownloadedTransferBean bean, DownloadManager downloadManager);

        void initRcv(DownloadManager downloadManager);

        void showDownloadNetTips(DownloadedDetailBean downloadedDetailBean);

        void setAllDownloadStatus(int status);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void initData(String courseId);

        abstract void isAbleStudy(final DownloadedDetailBean downloadedDetailBean, final int position
                , final int status,List<DownloadedDetailBean> downloadingList);

        abstract void startItem(DownloadedDetailBean downloadedDetailBean);

        abstract void stopOrStart(int allDownloadStatus,List<DownloadedDetailBean> downloadingList);
    }
}
